local ffi = require 'ffi'
ffi.cdef[[
/* + BEGIN /usr/include/GLES/gl.h */
/* ++ BEGIN /usr/include/GLES/glplatform.h */
/* +++ BEGIN /usr/include/KHR/khrplatform.h */
]] require 'ffi.req' 'KHR.khrplatform' ffi.cdef[[
/* +++ END   /usr/include/KHR/khrplatform.h */
/* ++ END   /usr/include/GLES/glplatform.h */
enum { GL_VERSION_ES_CM_1_0 = 1 };
/* ++ BEGIN /usr/include/KHR/khrplatform.h */
]] require 'ffi.req' 'KHR.khrplatform' ffi.cdef[[
/* ++ END   /usr/include/KHR/khrplatform.h */
typedef khronos_int8_t GLbyte;
typedef khronos_float_t GLclampf;
typedef khronos_int16_t GLshort;
typedef khronos_uint16_t GLushort;
typedef void GLvoid;
typedef unsigned int GLenum;
typedef khronos_float_t GLfloat;
typedef khronos_int32_t GLfixed;
typedef unsigned int GLuint;
typedef khronos_ssize_t GLsizeiptr;
typedef khronos_intptr_t GLintptr;
typedef unsigned int GLbitfield;
typedef int GLint;
typedef khronos_uint8_t GLubyte;
typedef unsigned char GLboolean;
typedef int GLsizei;
typedef khronos_int32_t GLclampx;
enum { GL_VERSION_ES_CL_1_0 = 1 };
enum { GL_VERSION_ES_CM_1_1 = 1 };
enum { GL_VERSION_ES_CL_1_1 = 1 };
enum { GL_DEPTH_BUFFER_BIT = 256 };
enum { GL_STENCIL_BUFFER_BIT = 1024 };
enum { GL_COLOR_BUFFER_BIT = 16384 };
enum { GL_FALSE = 0 };
enum { GL_TRUE = 1 };
enum { GL_POINTS = 0 };
enum { GL_LINES = 1 };
enum { GL_LINE_LOOP = 2 };
enum { GL_LINE_STRIP = 3 };
enum { GL_TRIANGLES = 4 };
enum { GL_TRIANGLE_STRIP = 5 };
enum { GL_TRIANGLE_FAN = 6 };
enum { GL_NEVER = 512 };
enum { GL_LESS = 513 };
enum { GL_EQUAL = 514 };
enum { GL_LEQUAL = 515 };
enum { GL_GREATER = 516 };
enum { GL_NOTEQUAL = 517 };
enum { GL_GEQUAL = 518 };
enum { GL_ALWAYS = 519 };
enum { GL_ZERO = 0 };
enum { GL_ONE = 1 };
enum { GL_SRC_COLOR = 768 };
enum { GL_ONE_MINUS_SRC_COLOR = 769 };
enum { GL_SRC_ALPHA = 770 };
enum { GL_ONE_MINUS_SRC_ALPHA = 771 };
enum { GL_DST_ALPHA = 772 };
enum { GL_ONE_MINUS_DST_ALPHA = 773 };
enum { GL_DST_COLOR = 774 };
enum { GL_ONE_MINUS_DST_COLOR = 775 };
enum { GL_SRC_ALPHA_SATURATE = 776 };
enum { GL_CLIP_PLANE0 = 12288 };
enum { GL_CLIP_PLANE1 = 12289 };
enum { GL_CLIP_PLANE2 = 12290 };
enum { GL_CLIP_PLANE3 = 12291 };
enum { GL_CLIP_PLANE4 = 12292 };
enum { GL_CLIP_PLANE5 = 12293 };
enum { GL_FRONT = 1028 };
enum { GL_BACK = 1029 };
enum { GL_FRONT_AND_BACK = 1032 };
enum { GL_FOG = 2912 };
enum { GL_LIGHTING = 2896 };
enum { GL_TEXTURE_2D = 3553 };
enum { GL_CULL_FACE = 2884 };
enum { GL_ALPHA_TEST = 3008 };
enum { GL_BLEND = 3042 };
enum { GL_COLOR_LOGIC_OP = 3058 };
enum { GL_DITHER = 3024 };
enum { GL_STENCIL_TEST = 2960 };
enum { GL_DEPTH_TEST = 2929 };
enum { GL_POINT_SMOOTH = 2832 };
enum { GL_LINE_SMOOTH = 2848 };
enum { GL_SCISSOR_TEST = 3089 };
enum { GL_COLOR_MATERIAL = 2903 };
enum { GL_NORMALIZE = 2977 };
enum { GL_RESCALE_NORMAL = 32826 };
enum { GL_VERTEX_ARRAY = 32884 };
enum { GL_NORMAL_ARRAY = 32885 };
enum { GL_COLOR_ARRAY = 32886 };
enum { GL_TEXTURE_COORD_ARRAY = 32888 };
enum { GL_MULTISAMPLE = 32925 };
enum { GL_SAMPLE_ALPHA_TO_COVERAGE = 32926 };
enum { GL_SAMPLE_ALPHA_TO_ONE = 32927 };
enum { GL_SAMPLE_COVERAGE = 32928 };
enum { GL_NO_ERROR = 0 };
enum { GL_INVALID_ENUM = 1280 };
enum { GL_INVALID_VALUE = 1281 };
enum { GL_INVALID_OPERATION = 1282 };
enum { GL_STACK_OVERFLOW = 1283 };
enum { GL_STACK_UNDERFLOW = 1284 };
enum { GL_OUT_OF_MEMORY = 1285 };
enum { GL_EXP = 2048 };
enum { GL_EXP2 = 2049 };
enum { GL_FOG_DENSITY = 2914 };
enum { GL_FOG_START = 2915 };
enum { GL_FOG_END = 2916 };
enum { GL_FOG_MODE = 2917 };
enum { GL_FOG_COLOR = 2918 };
enum { GL_CW = 2304 };
enum { GL_CCW = 2305 };
enum { GL_CURRENT_COLOR = 2816 };
enum { GL_CURRENT_NORMAL = 2818 };
enum { GL_CURRENT_TEXTURE_COORDS = 2819 };
enum { GL_POINT_SIZE = 2833 };
enum { GL_POINT_SIZE_MIN = 33062 };
enum { GL_POINT_SIZE_MAX = 33063 };
enum { GL_POINT_FADE_THRESHOLD_SIZE = 33064 };
enum { GL_POINT_DISTANCE_ATTENUATION = 33065 };
enum { GL_SMOOTH_POINT_SIZE_RANGE = 2834 };
enum { GL_LINE_WIDTH = 2849 };
enum { GL_SMOOTH_LINE_WIDTH_RANGE = 2850 };
enum { GL_ALIASED_POINT_SIZE_RANGE = 33901 };
enum { GL_ALIASED_LINE_WIDTH_RANGE = 33902 };
enum { GL_CULL_FACE_MODE = 2885 };
enum { GL_FRONT_FACE = 2886 };
enum { GL_SHADE_MODEL = 2900 };
enum { GL_DEPTH_RANGE = 2928 };
enum { GL_DEPTH_WRITEMASK = 2930 };
enum { GL_DEPTH_CLEAR_VALUE = 2931 };
enum { GL_DEPTH_FUNC = 2932 };
enum { GL_STENCIL_CLEAR_VALUE = 2961 };
enum { GL_STENCIL_FUNC = 2962 };
enum { GL_STENCIL_VALUE_MASK = 2963 };
enum { GL_STENCIL_FAIL = 2964 };
enum { GL_STENCIL_PASS_DEPTH_FAIL = 2965 };
enum { GL_STENCIL_PASS_DEPTH_PASS = 2966 };
enum { GL_STENCIL_REF = 2967 };
enum { GL_STENCIL_WRITEMASK = 2968 };
enum { GL_MATRIX_MODE = 2976 };
enum { GL_VIEWPORT = 2978 };
enum { GL_MODELVIEW_STACK_DEPTH = 2979 };
enum { GL_PROJECTION_STACK_DEPTH = 2980 };
enum { GL_TEXTURE_STACK_DEPTH = 2981 };
enum { GL_MODELVIEW_MATRIX = 2982 };
enum { GL_PROJECTION_MATRIX = 2983 };
enum { GL_TEXTURE_MATRIX = 2984 };
enum { GL_ALPHA_TEST_FUNC = 3009 };
enum { GL_ALPHA_TEST_REF = 3010 };
enum { GL_BLEND_DST = 3040 };
enum { GL_BLEND_SRC = 3041 };
enum { GL_LOGIC_OP_MODE = 3056 };
enum { GL_SCISSOR_BOX = 3088 };
enum { GL_COLOR_CLEAR_VALUE = 3106 };
enum { GL_COLOR_WRITEMASK = 3107 };
enum { GL_MAX_LIGHTS = 3377 };
enum { GL_MAX_CLIP_PLANES = 3378 };
enum { GL_MAX_TEXTURE_SIZE = 3379 };
enum { GL_MAX_MODELVIEW_STACK_DEPTH = 3382 };
enum { GL_MAX_PROJECTION_STACK_DEPTH = 3384 };
enum { GL_MAX_TEXTURE_STACK_DEPTH = 3385 };
enum { GL_MAX_VIEWPORT_DIMS = 3386 };
enum { GL_MAX_TEXTURE_UNITS = 34018 };
enum { GL_SUBPIXEL_BITS = 3408 };
enum { GL_RED_BITS = 3410 };
enum { GL_GREEN_BITS = 3411 };
enum { GL_BLUE_BITS = 3412 };
enum { GL_ALPHA_BITS = 3413 };
enum { GL_DEPTH_BITS = 3414 };
enum { GL_STENCIL_BITS = 3415 };
enum { GL_POLYGON_OFFSET_UNITS = 10752 };
enum { GL_POLYGON_OFFSET_FILL = 32823 };
enum { GL_POLYGON_OFFSET_FACTOR = 32824 };
enum { GL_TEXTURE_BINDING_2D = 32873 };
enum { GL_VERTEX_ARRAY_SIZE = 32890 };
enum { GL_VERTEX_ARRAY_TYPE = 32891 };
enum { GL_VERTEX_ARRAY_STRIDE = 32892 };
enum { GL_NORMAL_ARRAY_TYPE = 32894 };
enum { GL_NORMAL_ARRAY_STRIDE = 32895 };
enum { GL_COLOR_ARRAY_SIZE = 32897 };
enum { GL_COLOR_ARRAY_TYPE = 32898 };
enum { GL_COLOR_ARRAY_STRIDE = 32899 };
enum { GL_TEXTURE_COORD_ARRAY_SIZE = 32904 };
enum { GL_TEXTURE_COORD_ARRAY_TYPE = 32905 };
enum { GL_TEXTURE_COORD_ARRAY_STRIDE = 32906 };
enum { GL_VERTEX_ARRAY_POINTER = 32910 };
enum { GL_NORMAL_ARRAY_POINTER = 32911 };
enum { GL_COLOR_ARRAY_POINTER = 32912 };
enum { GL_TEXTURE_COORD_ARRAY_POINTER = 32914 };
enum { GL_SAMPLE_BUFFERS = 32936 };
enum { GL_SAMPLES = 32937 };
enum { GL_SAMPLE_COVERAGE_VALUE = 32938 };
enum { GL_SAMPLE_COVERAGE_INVERT = 32939 };
enum { GL_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 };
enum { GL_COMPRESSED_TEXTURE_FORMATS = 34467 };
enum { GL_DONT_CARE = 4352 };
enum { GL_FASTEST = 4353 };
enum { GL_NICEST = 4354 };
enum { GL_PERSPECTIVE_CORRECTION_HINT = 3152 };
enum { GL_POINT_SMOOTH_HINT = 3153 };
enum { GL_LINE_SMOOTH_HINT = 3154 };
enum { GL_FOG_HINT = 3156 };
enum { GL_GENERATE_MIPMAP_HINT = 33170 };
enum { GL_LIGHT_MODEL_AMBIENT = 2899 };
enum { GL_LIGHT_MODEL_TWO_SIDE = 2898 };
enum { GL_AMBIENT = 4608 };
enum { GL_DIFFUSE = 4609 };
enum { GL_SPECULAR = 4610 };
enum { GL_POSITION = 4611 };
enum { GL_SPOT_DIRECTION = 4612 };
enum { GL_SPOT_EXPONENT = 4613 };
enum { GL_SPOT_CUTOFF = 4614 };
enum { GL_CONSTANT_ATTENUATION = 4615 };
enum { GL_LINEAR_ATTENUATION = 4616 };
enum { GL_QUADRATIC_ATTENUATION = 4617 };
enum { GL_BYTE = 5120 };
enum { GL_UNSIGNED_BYTE = 5121 };
enum { GL_SHORT = 5122 };
enum { GL_UNSIGNED_SHORT = 5123 };
enum { GL_FLOAT = 5126 };
enum { GL_FIXED = 5132 };
enum { GL_CLEAR = 5376 };
enum { GL_AND = 5377 };
enum { GL_AND_REVERSE = 5378 };
enum { GL_COPY = 5379 };
enum { GL_AND_INVERTED = 5380 };
enum { GL_NOOP = 5381 };
enum { GL_XOR = 5382 };
enum { GL_OR = 5383 };
enum { GL_NOR = 5384 };
enum { GL_EQUIV = 5385 };
enum { GL_INVERT = 5386 };
enum { GL_OR_REVERSE = 5387 };
enum { GL_COPY_INVERTED = 5388 };
enum { GL_OR_INVERTED = 5389 };
enum { GL_NAND = 5390 };
enum { GL_SET = 5391 };
enum { GL_EMISSION = 5632 };
enum { GL_SHININESS = 5633 };
enum { GL_AMBIENT_AND_DIFFUSE = 5634 };
enum { GL_MODELVIEW = 5888 };
enum { GL_PROJECTION = 5889 };
enum { GL_TEXTURE = 5890 };
enum { GL_ALPHA = 6406 };
enum { GL_RGB = 6407 };
enum { GL_RGBA = 6408 };
enum { GL_LUMINANCE = 6409 };
enum { GL_LUMINANCE_ALPHA = 6410 };
enum { GL_UNPACK_ALIGNMENT = 3317 };
enum { GL_PACK_ALIGNMENT = 3333 };
enum { GL_UNSIGNED_SHORT_4_4_4_4 = 32819 };
enum { GL_UNSIGNED_SHORT_5_5_5_1 = 32820 };
enum { GL_UNSIGNED_SHORT_5_6_5 = 33635 };
enum { GL_FLAT = 7424 };
enum { GL_SMOOTH = 7425 };
enum { GL_KEEP = 7680 };
enum { GL_REPLACE = 7681 };
enum { GL_INCR = 7682 };
enum { GL_DECR = 7683 };
enum { GL_VENDOR = 7936 };
enum { GL_RENDERER = 7937 };
enum { GL_VERSION = 7938 };
enum { GL_EXTENSIONS = 7939 };
enum { GL_MODULATE = 8448 };
enum { GL_DECAL = 8449 };
enum { GL_ADD = 260 };
enum { GL_TEXTURE_ENV_MODE = 8704 };
enum { GL_TEXTURE_ENV_COLOR = 8705 };
enum { GL_TEXTURE_ENV = 8960 };
enum { GL_NEAREST = 9728 };
enum { GL_LINEAR = 9729 };
enum { GL_NEAREST_MIPMAP_NEAREST = 9984 };
enum { GL_LINEAR_MIPMAP_NEAREST = 9985 };
enum { GL_NEAREST_MIPMAP_LINEAR = 9986 };
enum { GL_LINEAR_MIPMAP_LINEAR = 9987 };
enum { GL_TEXTURE_MAG_FILTER = 10240 };
enum { GL_TEXTURE_MIN_FILTER = 10241 };
enum { GL_TEXTURE_WRAP_S = 10242 };
enum { GL_TEXTURE_WRAP_T = 10243 };
enum { GL_GENERATE_MIPMAP = 33169 };
enum { GL_TEXTURE0 = 33984 };
enum { GL_TEXTURE1 = 33985 };
enum { GL_TEXTURE2 = 33986 };
enum { GL_TEXTURE3 = 33987 };
enum { GL_TEXTURE4 = 33988 };
enum { GL_TEXTURE5 = 33989 };
enum { GL_TEXTURE6 = 33990 };
enum { GL_TEXTURE7 = 33991 };
enum { GL_TEXTURE8 = 33992 };
enum { GL_TEXTURE9 = 33993 };
enum { GL_TEXTURE10 = 33994 };
enum { GL_TEXTURE11 = 33995 };
enum { GL_TEXTURE12 = 33996 };
enum { GL_TEXTURE13 = 33997 };
enum { GL_TEXTURE14 = 33998 };
enum { GL_TEXTURE15 = 33999 };
enum { GL_TEXTURE16 = 34000 };
enum { GL_TEXTURE17 = 34001 };
enum { GL_TEXTURE18 = 34002 };
enum { GL_TEXTURE19 = 34003 };
enum { GL_TEXTURE20 = 34004 };
enum { GL_TEXTURE21 = 34005 };
enum { GL_TEXTURE22 = 34006 };
enum { GL_TEXTURE23 = 34007 };
enum { GL_TEXTURE24 = 34008 };
enum { GL_TEXTURE25 = 34009 };
enum { GL_TEXTURE26 = 34010 };
enum { GL_TEXTURE27 = 34011 };
enum { GL_TEXTURE28 = 34012 };
enum { GL_TEXTURE29 = 34013 };
enum { GL_TEXTURE30 = 34014 };
enum { GL_TEXTURE31 = 34015 };
enum { GL_ACTIVE_TEXTURE = 34016 };
enum { GL_CLIENT_ACTIVE_TEXTURE = 34017 };
enum { GL_REPEAT = 10497 };
enum { GL_CLAMP_TO_EDGE = 33071 };
enum { GL_LIGHT0 = 16384 };
enum { GL_LIGHT1 = 16385 };
enum { GL_LIGHT2 = 16386 };
enum { GL_LIGHT3 = 16387 };
enum { GL_LIGHT4 = 16388 };
enum { GL_LIGHT5 = 16389 };
enum { GL_LIGHT6 = 16390 };
enum { GL_LIGHT7 = 16391 };
enum { GL_ARRAY_BUFFER = 34962 };
enum { GL_ELEMENT_ARRAY_BUFFER = 34963 };
enum { GL_ARRAY_BUFFER_BINDING = 34964 };
enum { GL_ELEMENT_ARRAY_BUFFER_BINDING = 34965 };
enum { GL_VERTEX_ARRAY_BUFFER_BINDING = 34966 };
enum { GL_NORMAL_ARRAY_BUFFER_BINDING = 34967 };
enum { GL_COLOR_ARRAY_BUFFER_BINDING = 34968 };
enum { GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 34970 };
enum { GL_STATIC_DRAW = 35044 };
enum { GL_DYNAMIC_DRAW = 35048 };
enum { GL_BUFFER_SIZE = 34660 };
enum { GL_BUFFER_USAGE = 34661 };
enum { GL_SUBTRACT = 34023 };
enum { GL_COMBINE = 34160 };
enum { GL_COMBINE_RGB = 34161 };
enum { GL_COMBINE_ALPHA = 34162 };
enum { GL_RGB_SCALE = 34163 };
enum { GL_ADD_SIGNED = 34164 };
enum { GL_INTERPOLATE = 34165 };
enum { GL_CONSTANT = 34166 };
enum { GL_PRIMARY_COLOR = 34167 };
enum { GL_PREVIOUS = 34168 };
enum { GL_OPERAND0_RGB = 34192 };
enum { GL_OPERAND1_RGB = 34193 };
enum { GL_OPERAND2_RGB = 34194 };
enum { GL_OPERAND0_ALPHA = 34200 };
enum { GL_OPERAND1_ALPHA = 34201 };
enum { GL_OPERAND2_ALPHA = 34202 };
enum { GL_ALPHA_SCALE = 3356 };
enum { GL_SRC0_RGB = 34176 };
enum { GL_SRC1_RGB = 34177 };
enum { GL_SRC2_RGB = 34178 };
enum { GL_SRC0_ALPHA = 34184 };
enum { GL_SRC1_ALPHA = 34185 };
enum { GL_SRC2_ALPHA = 34186 };
enum { GL_DOT3_RGB = 34478 };
enum { GL_DOT3_RGBA = 34479 };
void glAlphaFunc (GLenum func, GLfloat ref);
void glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
void glClearDepthf (GLfloat d);
void glClipPlanef (GLenum p, const GLfloat *eqn);
void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
void glDepthRangef (GLfloat n, GLfloat f);
void glFogf (GLenum pname, GLfloat param);
void glFogfv (GLenum pname, const GLfloat *params);
void glFrustumf (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
void glGetClipPlanef (GLenum plane, GLfloat *equation);
void glGetFloatv (GLenum pname, GLfloat *data);
void glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
void glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
void glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
void glLightModelf (GLenum pname, GLfloat param);
void glLightModelfv (GLenum pname, const GLfloat *params);
void glLightf (GLenum light, GLenum pname, GLfloat param);
void glLightfv (GLenum light, GLenum pname, const GLfloat *params);
void glLineWidth (GLfloat width);
void glLoadMatrixf (const GLfloat *m);
void glMaterialf (GLenum face, GLenum pname, GLfloat param);
void glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
void glMultMatrixf (const GLfloat *m);
void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
void glOrthof (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
void glPointParameterf (GLenum pname, GLfloat param);
void glPointParameterfv (GLenum pname, const GLfloat *params);
void glPointSize (GLfloat size);
void glPolygonOffset (GLfloat factor, GLfloat units);
void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
void glScalef (GLfloat x, GLfloat y, GLfloat z);
void glTexEnvf (GLenum target, GLenum pname, GLfloat param);
void glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
void glTexParameterf (GLenum target, GLenum pname, GLfloat param);
void glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
void glTranslatef (GLfloat x, GLfloat y, GLfloat z);
void glActiveTexture (GLenum texture);
void glAlphaFuncx (GLenum func, GLfixed ref);
void glBindBuffer (GLenum target, GLuint buffer);
void glBindTexture (GLenum target, GLuint texture);
void glBlendFunc (GLenum sfactor, GLenum dfactor);
void glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
void glClear (GLbitfield mask);
void glClearColorx (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
void glClearDepthx (GLfixed depth);
void glClearStencil (GLint s);
void glClientActiveTexture (GLenum texture);
void glClipPlanex (GLenum plane, const GLfixed *equation);
void glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
void glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
void glColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
void glCullFace (GLenum mode);
void glDeleteBuffers (GLsizei n, const GLuint *buffers);
void glDeleteTextures (GLsizei n, const GLuint *textures);
void glDepthFunc (GLenum func);
void glDepthMask (GLboolean flag);
void glDepthRangex (GLfixed n, GLfixed f);
void glDisable (GLenum cap);
void glDisableClientState (GLenum array);
void glDrawArrays (GLenum mode, GLint first, GLsizei count);
void glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
void glEnable (GLenum cap);
void glEnableClientState (GLenum array);
void glFinish (void);
void glFlush (void);
void glFogx (GLenum pname, GLfixed param);
void glFogxv (GLenum pname, const GLfixed *param);
void glFrontFace (GLenum mode);
void glFrustumx (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
void glGetBooleanv (GLenum pname, GLboolean *data);
void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
void glGetClipPlanex (GLenum plane, GLfixed *equation);
void glGenBuffers (GLsizei n, GLuint *buffers);
void glGenTextures (GLsizei n, GLuint *textures);
GLenum glGetError (void);
void glGetFixedv (GLenum pname, GLfixed *params);
void glGetIntegerv (GLenum pname, GLint *data);
void glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
void glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
void glGetPointerv (GLenum pname, void **params);
const GLubyte * glGetString (GLenum name);
void glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
void glGetTexEnvxv (GLenum target, GLenum pname, GLfixed *params);
void glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
void glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
void glHint (GLenum target, GLenum mode);
GLboolean glIsBuffer (GLuint buffer);
GLboolean glIsEnabled (GLenum cap);
GLboolean glIsTexture (GLuint texture);
void glLightModelx (GLenum pname, GLfixed param);
void glLightModelxv (GLenum pname, const GLfixed *param);
void glLightx (GLenum light, GLenum pname, GLfixed param);
void glLightxv (GLenum light, GLenum pname, const GLfixed *params);
void glLineWidthx (GLfixed width);
void glLoadIdentity (void);
void glLoadMatrixx (const GLfixed *m);
void glLogicOp (GLenum opcode);
void glMaterialx (GLenum face, GLenum pname, GLfixed param);
void glMaterialxv (GLenum face, GLenum pname, const GLfixed *param);
void glMatrixMode (GLenum mode);
void glMultMatrixx (const GLfixed *m);
void glMultiTexCoord4x (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
void glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
void glNormalPointer (GLenum type, GLsizei stride, const void *pointer);
void glOrthox (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
void glPixelStorei (GLenum pname, GLint param);
void glPointParameterx (GLenum pname, GLfixed param);
void glPointParameterxv (GLenum pname, const GLfixed *params);
void glPointSizex (GLfixed size);
void glPolygonOffsetx (GLfixed factor, GLfixed units);
void glPopMatrix (void);
void glPushMatrix (void);
void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
void glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
void glSampleCoverage (GLfloat value, GLboolean invert);
void glSampleCoveragex (GLclampx value, GLboolean invert);
void glScalex (GLfixed x, GLfixed y, GLfixed z);
void glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
void glShadeModel (GLenum mode);
void glStencilFunc (GLenum func, GLint ref, GLuint mask);
void glStencilMask (GLuint mask);
void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
void glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
void glTexEnvi (GLenum target, GLenum pname, GLint param);
void glTexEnvx (GLenum target, GLenum pname, GLfixed param);
void glTexEnviv (GLenum target, GLenum pname, const GLint *params);
void glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
void glTexParameteri (GLenum target, GLenum pname, GLint param);
void glTexParameterx (GLenum target, GLenum pname, GLfixed param);
void glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
void glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
void glTranslatex (GLfixed x, GLfixed y, GLfixed z);
void glVertexPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
void glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
enum { GL_OES_compressed_paletted_texture = 1 };
enum { GL_PALETTE4_RGB8_OES = 35728 };
enum { GL_PALETTE4_RGBA8_OES = 35729 };
enum { GL_PALETTE4_R5_G6_B5_OES = 35730 };
enum { GL_PALETTE4_RGBA4_OES = 35731 };
enum { GL_PALETTE4_RGB5_A1_OES = 35732 };
enum { GL_PALETTE8_RGB8_OES = 35733 };
enum { GL_PALETTE8_RGBA8_OES = 35734 };
enum { GL_PALETTE8_R5_G6_B5_OES = 35735 };
enum { GL_PALETTE8_RGBA4_OES = 35736 };
enum { GL_PALETTE8_RGB5_A1_OES = 35737 };
enum { GL_OES_point_size_array = 1 };
enum { GL_POINT_SIZE_ARRAY_OES = 35740 };
enum { GL_POINT_SIZE_ARRAY_TYPE_OES = 35210 };
enum { GL_POINT_SIZE_ARRAY_STRIDE_OES = 35211 };
enum { GL_POINT_SIZE_ARRAY_POINTER_OES = 35212 };
enum { GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES = 35743 };
void glPointSizePointerOES (GLenum type, GLsizei stride, const void *pointer);
enum { GL_OES_point_sprite = 1 };
enum { GL_POINT_SPRITE_OES = 34913 };
enum { GL_COORD_REPLACE_OES = 34914 };
enum { GL_OES_read_format = 1 };
enum { GL_IMPLEMENTATION_COLOR_READ_TYPE_OES = 35738 };
enum { GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES = 35739 };
/* + END   /usr/include/GLES/gl.h */
]]
return require 'ffi.load' 'GLESv1_CM'
